<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>学生分数查询</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f5f5f5;
        }
        .container {
            max-width: 600px;
            margin: 50px auto;
            padding: 20px;
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }
        h1 {
            text-align: center;
            color: #333;
        }
        form {
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        label {
            font-size: 16px;
            margin-bottom: 5px;
            color: #555;
        }
        input[type="text"] {
            width: 100%;
            padding: 10px;
            margin-bottom: 15px;
            border: 1px solid #ccc;
            border-radius: 4px;
            font-size: 16px;
        }
        input[type="submit"] {
            background-color: #4CAF50;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
        }
        input[type="submit"]:hover {
            background-color: #45a049;
        }
        h2 {
            margin-top: 20px;
            color: #333;
        }
        p {
            font-size: 16px;
            margin-bottom: 10px;
            color: #555;
        }
        a {
            display: block;
            margin-top: 20px;
            text-align: center;
            color: #4CAF50;
            text-decoration: none;
            font-size: 16px;
        }
        a:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>学生分数查询</h1>
        <form action="/select_stu_score" method="post">
            <label for="id">ID:</label>
            <input type="text" id="id" name="id">
            <label for="name">姓名:</label>
            <input type="text" id="name" name="name">
            <label for="score">分数:</label>
            <input type="text" id="score" name="score">
            <input type="submit" value="查询">
        </form>

        <!-- 如果查询到了学生信息，则显示 -->
        {% if student %}
        <h2>查询结果</h2>
        <p>ID: {{ student[0] }}</p>
        <p>姓名: {{ student[1] }}</p>
        <p>分数: {{ student[2] }}</p>
        {% endif %}

        <!-- 添加超链接 -->
        <p><a href="/select_stu_score">查询学生信息</a></p>
    </div>
</body>
</html>
